package work5;

/**
 * @TODO
 * @Author xu
 * 2025/2/26
 */
public class Work3 {

    public static void main(String[] args) {
        String str = "Hello, World!";
        String reversed = reverseString(str);
        System.out.println("反转后的字符串: " + reversed);
    }

    public static String reverseString(String str) {
        return new StringBuilder(str).reverse().toString();
    }
}
